class GradableGenerator < Rails::Generator::NamedBase
  def manifest
    recorded_session = record do |m|
      m.class_collisions class_name
      
      m.template "app/controllers/controller_template.rb" ,
                  "app/controllers/#{file_name.pluralize}_controller.rb"
      
      m.template "app/models/model_template.rb" ,
                  "app/models/#{file_name}.rb"
                  
      m.migration_template 'db/migrations/migration_template.rb', 'db/migrate', :assigns => {
                :migration_name => "Create#{class_name.pluralize.gsub(/::/, '')}"
              }, :migration_file_name => "create_#{file_path.gsub(/\//, '_').pluralize}"
    end
  end
end
